const getEnvConfig = () => {
    // 不传环境变量默认设置为dev
    const env = process.env.REACT_APP_ENV || 'dev'
    console.log(`env===${env}`)
  
    const configs = {
        dev: {
            env: 'dev',
            apiBaseUrl: 'http://geek.itheima.net/v1_0',
            logLevel: 'debug'
        },
        mock: {
            env: 'mock',
            apiBaseUrl: 'http://localhost:8888/',
            logLevel: 'info'
        }
    }
    
    return configs[env]
}

export default getEnvConfig